package pull;

import helper.ImageData;
import helper.ImageProcessor;
import framework.filters.AbstractPullFilter;
import framework.pipes.PullPipe;

/**
 * Apply the invert operation on the given image
 * 
 * @author Wetzel & Rusch
 * 
 */
public class InvertFilter extends AbstractPullFilter<ImageData> {

	public InvertFilter(PullPipe<ImageData> pullPipe) {
		super(pullPipe);
	}

	@Override
	public void doIt() {
		// ParameterBlock pb = new ParameterBlock();
		// pb.addSource(m_data.getRoiImage());
		// m_data.setRoiImage(JAI.create("invert", pb));
		ImageProcessor ip = ImageProcessor.getInstance();
		m_data.setRoiImage(ip.getInvert(m_data.getRoiImage()));
	}
}
